using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
using FutureOpen.Web.Pages;
using FutureOpen.Core.func.sql;
using FutureOpen.Core.func.util;

public partial class controls_OverviewGroupsPath : System.Web.UI.UserControl
{
    private int cid;
    private PageBase pbase;
    protected void Page_Load(object sender, EventArgs e)
    {
        pbase = (PageBase)this.Page;
        pbase.PageInit();

        cid = pbase.catid;
        if (!Page.IsPostBack)
        {
            BuildPath();
        }
     
    }

    public void BuildPath()
    {
        if (cid < 0)
        {
            cid = 0;
        }
        CatItem.Init();
        CatItem item = CatItem.index[cid];
        
        StringBuilder sb = new StringBuilder();
        
        while (item != null)
       {
           sb.Insert(0, CatItem.GetLink(item));
           sb.Insert(0, @"&nbsp;\&nbsp;");
           item = item.parent;
        }
        this.ltContent.Text = sb.ToString();

                        
    }
}

